<?php
$club_number=$_REQUEST['c_number'];
$district=$_REQUEST['distri'];
$area=$_REQUEST['area'];
$division=$_REQUEST['division'];
$c_name=$_REQUEST['c_name'];
$c_d=$_REQUEST['c_d'];
$add1=$_REQUEST['add1'];
$add2=$_REQUEST['add2'];
$cuidad=$_REQUEST['cuidad'];
$estado=$_REQUEST['estado'];
$cp=$_REQUEST['cp'];
$pais=$_REQUEST['pais'];
$tel=$_REQUEST['tel'];
$mt=$_REQUEST['mt'];
$md=$_REQUEST['md'];
$cs=$_REQUEST['cs'];
$cws=$_REQUEST['cws'];
$cem=$_REQUEST['cem'];
$face=$_REQUEST['face'];
$adv=$_REQUEST['adv'];
$statuss=$_REQUEST['statuss'];
include "libreria.php";
$band=0;
if(numeros ($district)==0)  {  echo "<center>Distrito Invalido.";  $band=1;  }
if(numeros ($area)==0)  {  echo "<center>Area Invalida.";  $band=1;  }
if(nombre ($division)==0)  {  echo "<center>Division Invalida.";  $band=1;  }
if(nombre ($cuidad)==0)  {  echo "<center>Ciudad Invalido.";  $band=1;  }
if(cp ($cp)==0)  {  echo "<center>Codigo Postal Invalido.";  $band=1;  }$fecha = date('Y-m-j');
if ($statuss=='a'){$dateactuv=$fecha;} else {$dateactuv=null;}
include "db.php";
if ($band==0){
$sql = "UPDATE st_club SET district='$district', areas='$area', division='$division', club_name='$c_name', 
charter_date='$c_d', address1='$add1', address2='$add2',city='$cuidad', estado_id='$estado', cp='$cp', country='$pais',
phone='$tel', meeting_time='$mt', meeting_day='$md', club_status='$cs', club_website='$cws', club_email='$cem', 
facebook='$face', advance='$adv', statuss='$statuss', date_activacion='$dateactuv' WHERE club_number='$club_number'";
$valor = mysql_query($sql) or die ("error de consulta");
echo "El club se modifico corretamente.";
}